# XML elements and attributes

An XML document can contain element types, elements, and attributes of elements. Each XML document has a single element called the document element or root element, which contains other nested elements. The root element of a graphic XML document is the gfx element. It represents the graphic display.

Other elements defining and describing the graphic display are nested in the gfx element. Elements consist of a start-tag, the element's contents, and an end-tag. Elements have attributes, and attributes have values. You can specify multiple attributes for an element and have multiple elements in an XML file.

Elements can also have sub-elements nested within them, with their own attributes. Captions, imageSettings, states, animations, thresholds, and connections are examples of sub-elements. These in turn may have their own sub-elements, such as stateID elements within the states element, animateType elements within the animations element, threshold elements within the thresholds element, and connection elements within the connections element. caption and imageSettings elements can be sub-elements of a graphic object, or sub-elements within a state sub-element.

In the help definitions of elements and attributes:

- Text in quotes "" indicates a data type such as string, integer, float, and other.
- Text separated by a vertical bar | indicates the possible values for an attribute, only one of which can be specified at a time.
- Values appear in double quotes and follow an equal (=) sign.

Each graphic object is defined as a separate element in an XML file, and is identified by its element type, for example, interLockedButton. Type names have lower case initial letters and uppercase letters at the start of each word making up the concatenated type name. Each object within the type can be further identified by a unique name, such as interlockedPushButton1. Attributes following the element type specify the properties defined for the object. Each attribute has a value. The kind of values an attribute takes depends on the property. Values may be simple numbers, floating point numbers, selections from an enumerated list, character strings or Boolean values.

## See also

RRGGBB color table

About XML (Extensible Markup Language)

Graphic display XML file structure

Graphic display XML schema

Keywords: element, attribute